{	15 January 2011. Individual Olympiad. Problem set: http://neerc.ifmo.ru/school/io/archive/20110115/problems-individual-20110115.pdf
	Problem B
	Points: 34	
}

uses SysUtils;
var k,n,j:int64; ed,bg:string; i:longint;
function check(s:string):boolean;
var i:integer;
begin
result:=true;
for i:=1 to length(s) div 2 do
  if s[i]<>s[length(s)+1-i] then result:=false;
end;
begin
reset(input,'dnaand.in');
rewrite(output,'dnaand.out');
readln(n,k);
{if (n=2) and (k=1) then writeln('AA') else
if (n=5) and (k=6) then writeln('ACCCA') else writeln('Impossible')}
if k<=1000 then begin
  ed:='';
  bg:='';
  for i:=1 to n do begin
    ed:=ed+'G';
    bg:=bg+'A';
  end;
  j:=0;
  while (ed<>bg) and (j<>k) do begin
    if check(bg) then inc(j);
  if j<>k then begin
    if bg[length(bg)]<>'T' then begin
      if bg[length(bg)]='A' then bg[length(bg)]:='C' else
      if bg[length(bg)]='C' then bg[length(bg)]:='G' else
      if bg[length(bg)]='G' then bg[length(bg)]:='T';
    end else begin
      i:=length(bg);
      while (bg[i]='T') and (i>0) do begin
        bg[i]:='A';
        dec(i);
      end;
      if bg[i]='A' then bg[i]:='C' else
      if bg[i]='C' then bg[i]:='G' else
      if bg[i]='G' then bg[i]:='T';
    end;
  end;
  end;
  if j=k then writeln(bg) else writeln('Impossible');
end else writeln('Impossible');
end.
 